﻿'Clinciu Andrei
Option Strict On

Imports Gift.BL
Imports System.Configuration

Public Class frmOrdersShowProducts
    Private _products As List(Of OrderProducts)

    Public Property Products As List(Of OrderProducts)
        Get
            Return _products
        End Get
        Set(ByVal value As List(Of OrderProducts))
            flvProducts.Colums = {"Product", "Aantal besteld", "Prijs per eenheid", "Subtotaal"}
            For Each theOrder As OrderProducts In value

                Dim flvi As New FilteredListViewItem({theOrder.Product, CStr(theOrder.TotalOrdered), CStr(theOrder.PricePerOne), CStr(theOrder.Subtotal)}, theOrder)
                'flvProducts.lstView.Items.Add(flvi)
                flvProducts.Items.Add(flvi)
            Next

            flvProducts.FillListItems()
            _products = value
        End Set
    End Property

    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
    End Sub


    Private Sub frmOrdersShowProducts_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class